/** 
 * @Description: 文件描述
 * @Author: 程前
 * @Date: 2025-01-06 10:51:59
 * @LastEditors: 程前
 * @LastEditTime: 2025-01-06 11:41:00
 */
import { GeometryInstance, CircleGeometry, Material, EllipsoidSurfaceAppearance, CircleOutlineGeometry, Primitive, PerInstanceColorAppearance, ColorGeometryInstanceAttribute, Color } from 'cesium'

const createPrimitiveCircle = (center: any, radius: number, color: Color) => {
    const geometry = new CircleOutlineGeometry({
        center: center,
        radius: radius,
        // vertexFormat: EllipsoidSurfaceAppearance.VERTEX_FORMAT
    });
    const instance = new GeometryInstance({
        geometry: geometry,
    });
    const primitive = new Primitive({
        geometryInstances: instance,
        appearance: new EllipsoidSurfaceAppearance({
            material: Material.fromType('Color', {
                color,
            })
        }),
    });
    return primitive
};

export {
    createPrimitiveCircle
}
